<template>
	<view class="pubTitle">
		
		<view class="big">{{title}}</view>
		<view class="small">{{subtitle}}</view>
		<view class="line"></view>
		<view>数字类型：{{index}}</view>
		<view>数组类型：{{mArr}}</view>
		<view>对象类型：{{mObj}}</view>
	</view>
</template>

<script>
	export default {
		name:"pubTitle",
		props:{
			"title":{
				type:String,
				default:"默认标题"
			},
			"subtitle":{
				type:String,
				default:"defaule page"
			},
			"index":{
				type:Number,
				default:0
			},
			"mArr":{
				type:Array,
				default(){
					return [1,2,'3']
				}
			},
			mObj:{
				type:Object,
				default(){
					return {name:'匿名',年龄:'未知'}
				}
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss">
.pubTitle{
	padding: 60rpx 30rpx;//先上下，后左右
	text-align: center;
	background-color: #08D9D6;
	.big{
		font-size: 50rpx;
		font-weight: 600;
		color: #333;
	}
	.small{
		font-size: 28rpx;
		color:#999;
	}
	.line{
		display: inline-block;
		width: 80rpx;
		height: 8rpx;
		background-color: red;
		border-radius: 10rpx;
	}
}
</style>